module(...,package.seeall)
local sdkInstance = nil
if USEDSDK then
    if device.platform == "android" then
        sdkInstance = require("script.sdk.provider.ProviderAndroid")
    elseif device.platform == "ios" then
        sdkInstance = require("script.sdk.provider.ProviderIOS")
    else
        sdkInstance = require("script.sdk.provider.ProviderPlayer")
    end
else
    sdkInstance = require("script.sdk.provider.ProviderPlayer")
end

local SdkManager = class("SdkManager",sdkInstance)


function SdkManager:initSDK(callback)
    self.super.initSDK(self,{listener=callback})
end
-- return {logintype=16, LOGININFO="{isLogined:true,username:400088117,sessionid:sessionid}"}
function SdkManager:quicklogin(callback)
    self.super.quicklogin(self,{listener=callback})
end
-- return {logintype=16, LOGININFO="{isLogined:true,username:400088117,sessionid:sessionid}"}
function SdkManager:login(callback)
    self.super.login(self,{Fvalue=Fvalue,serverID=l_global.server.serverId,serverName=l_global.server.name,listener=callback})
end
function SdkManager:changeAccountListener(callback)
    if not self.addchangeAccountListener then
        self.super.changeAccountListener(self,{listener=function(argu)
            Services:getMessageService():disconnect()
            l_command.destoryModuleAll()
            display.replaceScene(require("script.oyeahgame.scene.LoginScene").new())
        end})
        self.addchangeAccountListener = true
    end
end
function SdkManager:logout(callback)
    self.super.logout(self,{listener=callback})
end
return SdkManager:new()